#include<iostream>
using namespace std;
#include<fstream>
#include<cmath>

#include"library.h"

double psi(double alpha, double x){
	return x*exp(-alpha*x*x);
}

/*
 * EL(alpha, x) = (- 1/2 *d^2/dx^2 + x^2/2) psi / psi = 3 alpha + (1/2-2*alpha*alpha)*x*x
 */
double EL(double alpha, double x){
	return 3*alpha + (0.5-2*alpha*alpha)*x*x;
}

int main(){

	ofstream fp("exe7.txt");
	for(double alpha=0.4; alpha <=0.6; alpha += 0.01){
		fp << alpha << "\t" << vmc1d_aveEL(alpha, 100, psi, EL, 0, 5, 0.2, 10000) <<endl;
	}
	fp.close();
	return 0;
}
